package rename_tab

import (
	"file_explorer/view/components/main_panel/fe_tab"
	"file_explorer/view/store"

	"fyne.io/fyne/v2/container"
)

type RenameTab struct {
	fe_tab.DefaultTab

	tabCtx *store.RenameTabContext
}

func NewRenameTab(tabCtx store.TabContext) *RenameTab {
	tab := &RenameTab{
		tabCtx: tabCtx.(*store.RenameTabContext),
	}

	tab.Container = container.NewBorder(nil, nil, nil, nil,
		container.NewVSplit(
			newRenameRuleList(tab.tabCtx).Container, newRenameFileList(tab.tabCtx).Container,
		),
	)

	return tab
}
